using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TerritoryDesignTools._TerritorySolution
{
    /// <summary>
    /// <para>Load Territory Records</para>
    /// <para>Adds records (features) or updates existing records for the specified level.</para>
    /// <para>添加记录（功能）或更新指定级别的现有记录。</para>
    /// </summary>    
    [DisplayName("Load Territory Records")]
    public class LoadTerritoryRecords : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LoadTerritoryRecords()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_territory_solution">
        /// <para>Input Territory Solution</para>
        /// <para>The name of the input territory solution.</para>
        /// <para>输入区域解决方案的名称。</para>
        /// </param>
        /// <param name="_level">
        /// <para>Level</para>
        /// <para>The name of the level to which the data will be loaded.</para>
        /// <para>数据将加载到的级别的名称。</para>
        /// </param>
        /// <param name="_in_data">
        /// <para>Input Data</para>
        /// <para>The layer or records to be loaded.</para>
        /// <para>要加载的图层或记录。</para>
        /// </param>
        public LoadTerritoryRecords(object _in_territory_solution, object _level, object _in_data)
        {
            this._in_territory_solution = _in_territory_solution;
            this._level = _level;
            this._in_data = _in_data;
        }
        public override string ToolboxName => "Territory Design Tools";

        public override string ToolName => "Load Territory Records";

        public override string CallName => "td.LoadTerritoryRecords";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_territory_solution, _level, _in_data, _id_field, _name_field, _field_map, _append_data.GetGPValue(), _out_territory_solution];

        /// <summary>
        /// <para>Input Territory Solution</para>
        /// <para>The name of the input territory solution.</para>
        /// <para>输入区域解决方案的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_territory_solution { get; set; }


        /// <summary>
        /// <para>Level</para>
        /// <para>The name of the level to which the data will be loaded.</para>
        /// <para>数据将加载到的级别的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _level { get; set; }


        /// <summary>
        /// <para>Input Data</para>
        /// <para>The layer or records to be loaded.</para>
        /// <para>要加载的图层或记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_data { get; set; }


        /// <summary>
        /// <para>ID Field</para>
        /// <para>The field containing the ID values to be loaded into the level.</para>
        /// <para>包含要加载到关卡中的 ID 值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _id_field { get; set; } = null;


        /// <summary>
        /// <para>Name Field</para>
        /// <para>The field containing the name values to be loaded into the level.</para>
        /// <para>包含要加载到关卡中的名称值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _name_field { get; set; } = null;


        /// <summary>
        /// <para>Field Map</para>
        /// <para><xdoc>
        ///   <para>The values that will be used for the territory properties.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Parent Territory ID—The ID of the parent territory.</bullet_item><para/>
        ///       <bullet_item>Locked State—The territory can't be modified.</bullet_item><para/>
        ///       <bullet_item>Center Locked—Center points can't be modified and will remain in their fixed locations.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于 territory 属性的值。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>父区域 ID - 父区域的 ID。</bullet_item><para/>
        ///       <bullet_item>锁定状态 - 无法修改区域。</bullet_item><para/>
        ///       <bullet_item>中心锁定 - 中心点无法修改，将保留在其固定位置。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Map")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_map { get; set; } = null;


        /// <summary>
        /// <para>Append Data</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the records being loaded will be appended or replaced.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The records being loaded to the specified level will be appended.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The records being loaded to the specified level will be replaced. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是追加还是替换正在加载的记录。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将追加正在加载到指定级别的记录。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将替换正在加载到指定级别的记录。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append Data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _append_data_value _append_data { get; set; } = _append_data_value._false;

        public enum _append_data_value
        {
            /// <summary>
            /// <para>APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPEND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>REPLACE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REPLACE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Territory Solution</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_territory_solution { get; set; }


        public LoadTerritoryRecords SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}